this.name      = "Transfer Shuttle Script";
this.author      = "Frame, Lestradae & some help from Thargoid, Kaks & another_commander";
this.copyright      = "All";
this.description   = "Enables the player to dock player carriers at any station or NPC carrier with an intermediate Transfer Shuttle";
this.version      = "0.1";

this.shipLaunchedFromStation = function()
{
   if(player.ship.hasEquipment("EQ_SHUTTLE"))
   {
      player.commsMessage("Commander " + player.name + ", your transfer shuttle has been released from its docking clamps and is ready for liftoff. Have a safe journey to your carrier.");
      player.ship.position = player.ship.position.add(player.ship.orientation.vectorForward().multiply(12000))
   }
}

this.playerRequestedDockingClearance = function()
{
   if(player.ship.target) //no target no game, so it needs only to be in scanner range
   {
       this.targetStation = player.ship.target
       if(player.ship.hasEquipment("EQ_SHUTTLE"))
       {
           player.commsMessage("Commander " + player.name + ", your transfer shuttle has been given docking clearance. Have a pleasant flight and please dock in the appropriate hangar section.");
           this.targetStation.dockPlayer();
       }
    }
}